The present invention relates to an improved method of code error correction, for detecting and correcting errors in data after the data has been reproduced (following recording thereof) or received (following transmission thereof). Various methods of data error detection and correction are known, however the present invention is specifically applicable to a method whereby the data is divided into blocks of data words prior to transmission or recording, and each data block is divided into three sets of sub-blocks for the purpose of assigning a pair of check words to each sub-block. Each set of sub-blocks comprises the entire data block, with the sets being respectively formed by dividing the data block along three different array directions. The contents of the check words assigned to each sub-block are determined in accordance with a computation applied to the contents of all of the data words of the sub-block, such that if no error is present within the sub-block, the sum of the contents of the data words and check words of that sub-block must equal a predetermined value (e.g. zero). Upon reception (or reproduction) of the data block, the computation described above can be performed upon each set of sub-blocks to detect the presence or absence of errors therein, and also in the case of certain error patterns, to enable correction of the errors. That is to say, if the number of errors within the sub-block is below a certain number, the system determines the positions of data words or check words containing errors and the bit positions of the errors within these words, so that correction can be performed. During this error correction processing, an error flag (i.e. a binary code bit) is assigned to each data word and check word), and the error flags of each sub-block are set to states indicating the presence or absence or errors therein, respectively, in accordance with the results of error detection processing and of any error correction processing performed on the sub-block.
The data block is transmitted (or recorded) in a sequence corresponding to the sequence of sub-blocks constituting one of the sets referred to above. As a result, since errors produced during recording-reproduction or transmission-reception tend to occur in bursts, each sub-block of the latter set will have a high probability of containing isolated bursts of successive errors therein, while the other two sets of sub-blocks will contain errors which are much more dispersed, so that the probabiity of each sub-block containing a burst of errors is very low. Thus, since correction of a set of sub-blocks containing a large number of errors is not possible, it is usual to perform only error detection for the set of sub-blocks corresponding to the transmission (or recording) sequence, and to simply set the error flags of all of the words within a sub-block in which an error is found to the "error indicating" status. Thereafter, both error detection and error correction processing is performed on the other two sets of sub-blocks, utilizing the information conveyed by the states of the error flags set in the initial error detection processing of the first set. No further error detection processing of the first set of sub-blocks (i.e. that corresponding to the data transmission or recording sequence) is performed, and as a result, as will be described in detail hereinafter, any missing of errors by the processing applied to the remaining two sets of sub-blocks, or any erroneous correction which results from this processing, can result in data errors being produced (or missed) which are impossible to correct thereafter, even if error correction processing is successively applied to the latter two sets of sub-blocks through a plurality of repetitions.